# Contributor: Jakub Jirutka <jakub@jirutka.cz>
# Maintainer: Jakub Jirutka <jakub@jirutka.cz>
pkgname=waylock
pkgver=0.6.3
pkgrel=0
pkgdesc="A small screenlocker for Wayland compositors"
url="https://github.com/ifreund/waylock"
arch="aarch64 x86_64"  # blocked by zig
license="ISC"
makedepends="
	libxkbcommon-dev
	linux-pam-dev
	scdoc
	wayland-dev
	wayland-protocols
	zig
	"
subpackages="$pkgname-doc"
source="https://github.com/ifreund/waylock/releases/download/v$pkgver/waylock-$pkgver.tar.gz
	pam-base-auth.patch
	"

build() {
	DESTDIR='.dest' zig build \
		--prefix /usr \
		-Doptimize=ReleaseSafe \
		-Dcpu=baseline \
		-Dpie=true \
		-Dman-pages=true \
		--prefix /usr install
}

package() {
	mkdir -p "$pkgdir"
	cp -r .dest/* "$pkgdir"/
}

sha512sums="
783190a0bb225dc6e1483efd95ae9222f8bfd2a208d8a7fb408637068a5258b4333b083b5955af0b6f034e26b3a4678c822353211689d4194e2e503c4858fa0c  waylock-0.6.3.tar.gz
e3f5aa479908babbeea2febecdf7c57a5cf6b9153c4cd63731721cdf6d50bd0417077b37effec1520064918a422c4313d24ee9c2b2a77c328be931ffbeb03161  pam-base-auth.patch
"
